import React from 'react'

export default function Dialog({visible,tip,confirm,cancel,content}) {
  return (
    <div className="dialog" style={{display:visible?"block":"none"}}>
    <div className="dialog-box">
      <div className="dialog-tip">{tip}</div>
      <div className="dialog-content">{content}</div>
      <div className="dialog-footer">
        <button onClick={confirm}>确定</button>
        <button onClick={cancel}>取消</button>
      </div>
    </div>
  </div>
  )
}
